package com.qiusuo0226.self.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableCharset;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableEngine;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.qiusuo0226.mysql.pojo.CommonEntity;
import com.qiusuo0226.self.constant.Tables;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 个人密码管理实体映射类
 * @author qiusuo
 * @date 2023/7/15 22:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = Tables.SELF_PASSWORD_MANAGE)
@Table(name = Tables.SELF_PASSWORD_MANAGE, comment = "个人模块：密码管理表")
@TableCharset(MySqlCharsetConstant.UTF8MB4)
@TableEngine(MySqlEngineConstant.InnoDB)
public class PasswordManageDO extends CommonEntity implements Serializable {

    private static final long serialVersionUID = 8522019713894061009L;

    @TableField(value = "creater")
    @Column(name = "creater", type = MySqlTypeConstant.BIGINT, comment = "创建者唯一标识", isNull=false)
    private Long creater;

    @TableField(value = "software_name")
    @Column(name = "software_name", type = MySqlTypeConstant.VARCHAR, length = 50, comment = "软件名称", defaultValue = "", isNull=false)
    private String softwareName;

    @TableField(value = "website")
    @Column(name = "website", type = MySqlTypeConstant.VARCHAR, length = 255, comment = "网站网址", defaultValue = "", isNull=false)
    private String website;

    @TableField(value = "account")
    @Column(name = "account", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "登录账号", defaultValue = "", isNull=false)
    private String account;

    @TableField(value = "password")
    @Column(name = "password", type = MySqlTypeConstant.VARCHAR, length = 500, comment = "密码密文", defaultValue = "", isNull=false)
    private String password;

    @TableField(value = "encrypt_type")
    @Column(name = "encrypt_type", type = MySqlTypeConstant.VARCHAR, length = 2, comment = "加密方式", defaultValue = "1", isNull=false)
    private String encryptType;

    @TableField(value = "encrypt_key_info")
    @Column(name = "encrypt_key_info", type = MySqlTypeConstant.VARCHAR, length = 500, comment = "加密所需要的密钥信息内容", defaultValue = "", isNull=false)
    private String encryptKeyInfo;

    @TableField(value = "description")
    @Column(name = "description", type = MySqlTypeConstant.VARCHAR, length = 255, comment = "描述", defaultValue = "", isNull=false)
    private String description;

    @TableField(value = "tags")
    @Column(name = "tags", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "标签", defaultValue = "", isNull=false)
    private String tags;
}
